import React, { useState } from "react";
import { flushSync } from "react-dom";
const Crad = () => {
  console.log('Crad')
  const [a, seta] = useState(10)
  const [b, setb] = useState(10)
  const [c, setc] = useState(10)
   console.log(b,'1')
  const handle = () => {
    setb(b+1)
    console.log(b,'2')
    for(let i = 0; i < 100; i++){
      seta((r)=>{ return r+1})
    }
  }
  return (
    <div>
      <div>{a}</div>
      <div>{b}</div>
      <div>{c}</div>
      <button onClick={handle}>按钮1</button>
    </div>
  )
}
export default Crad